const express = require("express");
const {
  list,
  detail,
  add,
  del,
  update,
} = require("../../controllers/learn/articlesController");
const router = express.Router();

/**
 * 查询所有文章信息
 * GTE  /articles/list
 */
router.get("/list", list);

/**
 * 查询文章详情
 * GET /articles/details
 */
router.get("/details", detail);

/**
 * 新增文章
 * POST /articles/add
 */
router.post("/add", add);

/**
 * 删除文章
 * DELETE /articles/delete
 */
router.delete("/delete", del);

/**
 * 更新文章
 * PUT /articles/update
 */
router.put("/update", update);

module.exports = router;
